package mvc.controller;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Observable;

public class Controller extends Observable implements ActionListener {

	private double scaleFactor;
	
	public Controller(){
		scaleFactor = 1;
	}
	
	public double getScaleFactor() {
		return scaleFactor;
	}

	public void actionPerformed(ActionEvent event) {
		if(event.getActionCommand().equals("Zoom"))
			scaleFactor+=0.1;
		else{
			scaleFactor=1;
		}
		setChanged(); // Something was changed
		notifyObservers(); // Tell everybody who is listening (e.g. the GUI!)
	}
}
